import { defineStore } from 'pinia'
import { reactive } from 'vue'

export const useConfig = defineStore(
    'config',
    () => {
          const site = reactive({
              // 全局
              site_name: '',
          })

          const tree = reactive({
          })

          const propose = reactive({
          })

          // 设置栏目

          // 设置推荐栏目
          const setTree = function (tree) {
            this.tree = tree
          }

        // 站点名称
        const getSiteName = function (): string {
            return this.site.site_name
        }

        return { site, tree, propose, setTree,  getSiteName }
    },
    /*actions: {

    }*/
)
